<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1{width: 200px; height: 200px;background-color: red;margin-bottom: 30px;}
        .div2{width: 200px; height: 200px;background-color: gold;margin-top: 30px;}
        .box{overflow: hidden;}  


        /* 浮动元素：float除none以外的值
            绝对定位元素：position （absolute ， fixed）
            display为 inlink-block 、table-cells 、 flex
            overflow 除了visible 以外的值（hidden、auto、scroll） */


       .div3{width: 200px;height: 200px;background: red;overflow: hidden;}
       .div4{width: 100px;height: 100px;background: blue; margin-top: 20px;}

       .div5{width: 200px; border: black solid; display: inline-block;}
       .div6{width: 100px; height: 100px; background: blue; float: left;}
    </style>
</head>
<body>
   <DIV class="box">
    <div class="div1"></div>
   </DIV>
   <DIV class="box">
    <div class="div2"></div>
   </DIV><br>

   <div class="div3">
      <div class="div4"></div>
   </div>

   <div class="div5">
       <div class="div6"></div>
   </div>


</body>
</html>